<%@ page language="java"  pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/views/common/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>添加赠品</title>
    <%@ include file="/WEB-INF/views/common/resource.jsp" %>
    <link href="${rtx}/js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${rtx}/css/upload_style.css"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <h3 class="m-t-none m-b">添加赠品信息</h3>
                    <div class="form-horizontal">

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>赠品物料编号</label>
                            <div class="col-sm-4">
                                <input id="giveaway_no" type="text" placeholder="例:0001" class="form-control">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>赠品物料名称</label>
                            <div class="col-sm-4">
                                <input id="giveaway_name" type="text" placeholder="例:可口可乐零度" class="form-control">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>品牌分类</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="giveaway_brand" >
                                    <c:forEach items="${brandList}" var="list">
                                        <option value="${list.d_no}">${list.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>赠品类别</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="giveaway_type" >
                                    <c:forEach items="${goodsTypeList}" var="list">
                                        <option value="${list.d_no}">${list.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>规格</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="giveaway_specifications" >
                                    <c:forEach items="${goodsSpecList}" var="list">
                                        <option value="${list.d_no}">${list.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>单位</label>
                            <div class="col-sm-2">
                                <select class="form-control m-b" id="giveaway_unit" >
                                    <c:forEach items="${goodsUnitList}" var="list">
                                        <option value="${list.d_no}">${list.name}</option>
                                    </c:forEach>
                                </select>
                            </div>
                        </div>


                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>选择商品图片</label>
                            <div id="container" class="col-sm-4">
                                <a id="self" class="btn btn-sm btn-success" href="javascript:void(0);" >选择图片</a>
                            </div>
                            <!--图片上传进度条-->
                            <div id="uploading" class="shareBox" style="z-index: 1000; margin-left: 31%">
                                <div class="uploading_bar" id="ossfile" style="z-index: 1000;"></div>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">已上传图片</label>
                            <div id="upload-list" >

                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">赠品描述</label>
                            <div class="col-sm-8">
                                <textarea class="col-sm-8 " placeholder="在此输入赠品描述" style="height: 150px;" id="desc-content" title="desc"></textarea>
                            </div>
                        </div>


                        <div class="hr-line-dashed"></div>
                        <div class="form-group text-center">
                            <div class="text-center">
                                <button class="btn btn-lg btn-primary" onclick="addGiveaway()"><strong>保存商品</strong>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
<script>
    $(document).ready(function(){$(".fancybox").fancybox({openEffect:"none",closeEffect:"none"})});
</script>
</body>
<script language="javascript" type="text/javascript" src="${rtx}/js/goods/giveaway_add.js"></script>
<script language="javascript" type="text/javascript" src="${rtx}/js/plupload-2.1.2/js/plupload.full.min.js"></script>
<script language="javascript" type="text/javascript" src="${rtx}/js/upload_img.js"></script>
<script src="${rtx}/js/plugins/fancybox/jquery.fancybox.js"></script>
</html>
